using System;
using System.Windows.Input;

namespace TFS.Kanban.Commons.Commands
{
	public abstract class CommandBase : ICommand
	{
        public event EventHandler CanExecuteChanged = delegate { };

        public abstract void Execute(object parameter);
        
        public virtual bool CanExecute(object parameter)
		{
			return true;
		}

        public virtual string Name
        {
            get { return string.Empty; }
        }

        protected void OnCanExecuteChanged()
        {
            this.CanExecuteChanged(this, null);
        }
    }
}